package com.guoqing.test.example;


import java.io.File;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author zhangguoqing
 * @date 2020/9/11
 * Description: TODO
 */
public class FileUpload {

    public static void main1(String[] args) {
        String path1 = "E:/招行/image/";
        String fileName = "13.txt";
        File file = new File(path1, fileName);
        File parentFile = file.getParentFile();
        if (Objects.isNull(parentFile)) {
            System.out.println("null");
        }
        boolean directory = parentFile.isDirectory();
        if (!directory) {
            boolean mkdirs = parentFile.mkdirs();
        }
    }

    public static final Pattern COMPILED_PATTERN_MONEY = Pattern.compile("^([1-9]\\d{0,9}|0)([.]?|(\\.\\d{1,3})?)$");
//    public static final Pattern number = Pattern.compile("^[1-9]\\d*$");
    public static final Pattern number = Pattern.compile("^[1-9]{1}[0-9]{0,2}$");
    public static void main(String[] args) {
        Matcher m = number.matcher("-9");
        System.out.println(m.matches());
    }
}
